/*
获得数据
 */
export default {
  todos(state){
    return state.todos
  },
  completeSize(state) {
    return state.todos.reduce((preTotal, todo) => preTotal + (todo.complete ? 1 : 0), 0)
  },
  isCheckAll(state,getters){
    return getters.completeSize === state.todos.length && getters.completeSize > 0
  }
}
